﻿using System;

namespace FNN.CustomFunctions
{
    [Serializable]
    public class HyperboleTangent : IFunction
    {
        /// <summary>
        ///     Функция y = (e^x-e^(-x))/(e^x+e^(-x))
        /// </summary>
        /// <param name="param">Аргумент функции</param>
        /// <returns>Значение функции</returns>
        public double Calculate(double param)
        {
            return (Math.Exp(param) - Math.Exp(-param)) / (Math.Exp(param) + Math.Exp(-param));
        }
    }
}